package com.hurteng.stormplane;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.hurteng.stormplane.myplane.R;

public class LoginActivity extends Activity {
    private Button bt_login;
    private TextView tv_forgetpwd;
    private TextView tv_signin;
    private String account;
    private String pwd;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        /*与页面按键相连接*/
        bt_login=findViewById(R.id.bt_login);
        tv_forgetpwd=findViewById(R.id.tv_forgetpwd);
        tv_signin=findViewById(R.id.tv_signin);
        /*设置点击监听事件*/
        bt_login.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //登录按键
                // TODO: 2020/3/19 添加服务器验证信息获取用户信息
                ReadyActivity.actionStart(LoginActivity.this,"test");
                finish();
            }
        });
        tv_signin.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //注册
                Intent intent=new Intent(LoginActivity.this,SigninActivity.class);
                startActivity(intent);
            }
        });
        tv_forgetpwd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //忘记密码
                Intent intent=new Intent(LoginActivity.this,FgpwdActivity.class);
                startActivity(intent);
            }
        });
    }
}
